<?php
/**
 * @package Autogenerator for Joomla!
 * @version 3.0.0
 * @author Truong Cong Duc <truongcongduc4@gmail.com>
 * @link autogenerator.blogspot.com
 * @copyright (c) 2013, Truong Cong Duc
 * @license GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/autogenerator.php';
JFormHelper::loadFieldClass('list');

class JFormFieldXmlType extends JFormFieldList
{

    public $type = 'XmlType';

    protected function getOptions()
    {
        $options = AutogeneratorHelper::getAllXMLTypes();
        $parent = new stdClass;
        $parent->text = JText::_('JGLOBAL_ROOT_PARENT');
        $parent->value = '';
        array_unshift($options, $parent);

        return $options;
    }

}
